<?php
/*! \brief
 * This is WFServerFactory class
 * This is the Simple Factory Class that create relative Server Class
 * \author William Su
 */
class WFServerFactory
{
	private static $instance;
	/**
	 * @var WF
	 */
	private $objFramework;
	public function __construct($objFramework){
		$this->objFramework = $objFramework;
	}
    public static function getDirnameFile(){
		if(!isset(self::$instance[__FUNCTION__])){
		    self::$instance[__FUNCTION__] = dirname(__FILE__);
		}
		return self::$instance[__FUNCTION__];
	}
	/**
	 * @return WFServerListType
	 */
	public function getServerListType($strAssignedserverlistxml = null){
		if(!class_exists('WFServerListType')){
			require_once self::getDirnameFile().'/ServerListType.php';
		}
		self::$instance[__FUNCTION__] = new WFServerListType($strAssignedserverlistxml);
		return self::$instance[__FUNCTION__];
	}
}